package upc.condominio.edu.domain;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Calendar;
import javax.validation.constraints.Past;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.springframework.format.annotation.DateTimeFormat;
import upc.condominio.edu.referencia.TipoDocumento;
import javax.persistence.Enumerated;

@RooJavaBean
@RooToString
@RooEntity
public abstract class Persona {

    @NotNull
    @Size(max = 100)
    private String nombres;

    @NotNull
    @Size(max = 200)
    private String apellidos;

    @Past
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(style = "S-")
    private Calendar fecNacimiento;

    @NotNull
    @Enumerated
    private TipoDocumento tipoDoc;

    @NotNull
    private String nroDocumento;

    @Size(max = 100)
    private String email;

    private String telefono;
}
